package gameobject.construct;

import com.jme3.scene.shape.Box;
import mygame.Vector3i;
import mygame.Voxel;

public abstract class BaseHalfBlock extends Construct {

    /*
    public static BaseHalfBlock createInstance() {
        return BaseHalfBlock.createInstance(DEFAULT_BASE_VOXEL_LOCATION);
    }

    public static BaseHalfBlock createInstance(Vector3i baseVoxelGridLocation) {
        BaseHalfBlock instance = new BaseHalfBlock();
        instance.init(baseVoxelGridLocation);
        return instance;
    }
    */

    protected void addModel() {
	addModelDefault(new Box(Voxel.VOXEL_EXTENT, Voxel.VOXEL_EXTENT/2, Voxel.VOXEL_EXTENT));
    }

    @Override
    protected int getNumOccupiedVoxels() {
	return DEFAULT_NUM_OCCUPIED_VOXELS;
    }
    
    @Override
    protected void setLocalTranslationWithRespectToBase() {
        setLocalTranslationWithRespectToBaseDefault();
    }

    @Override
    protected void recalculateOccupiedVoxels() {
	System.out.println("Recalculating occupied voxels...");
        occupiedVoxels.get(0).setVoxelGridLocation(baseVoxelGridLocation);
        System.out.println(occupiedVoxels);
    }
}
